//
//  BPLoginViewModel.m
//  MVVM_Example
//
//  Created by 404 on 2020/11/17.
//  Copyright © 2020 xuhongji. All rights reserved.
//

#import "BPLoginViewModel.h"
#import "BPHomeViewModel.h"

@interface BPLoginViewModel ()
@property(nonatomic, strong, readwrite) RACCommand *pushCommand;
@end


@implementation BPLoginViewModel
- (void)mvvm_initializeForViewModel{
    // 初始化viewModel
    self.pushCommand = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
        BPHomeViewModel *model = [[BPHomeViewModel alloc] initWithServices:self.services params:nil];
        [self.services pushViewModel:model animated:YES];
        return [RACSignal empty];
    }];
}

@end
